import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

import { registerMicroApps, start } from 'qiankun';
registerMicroApps([
  {
    name: 'face-library', // app name registered
    // entry: '//192.168.2.123:7100',
    entry: 'http://192.168.2.123:2126/micro-apps/react16',
    container: '#sub-app',
    activeRule: '/react16',
  },
  {
    name: 'bige-frontend', // app name registered
    entry: '//192.168.2.123:8101',
    // entry: 'http://192.168.2.123:2126/micro-apps/bige-frontend',
    container: '#sub-app',
    activeRule: '/bige-frontend',
    props: {
      onClick: event => console.log(event),
      name: 'xx',
      age: 1,
    },
  },

]);
start();

ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
